Integrand size = 34, antiderivative size = 157 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=4 a^3 (i A+B) x+\frac {4 a^3 (i A+B) \cot (c+d x)}{d}+\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{12 d}+\frac {4 a^3 (A-i B) \log (\sin (c+d x))}{d}-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}-\frac {(3 i A+2 B) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{6 d} \]
4*a^3*(I*A+B)*x+4*a^3*(I*A+B)*cot(d*x+c)/d+1/12*a^3*(15*A-14*I*B)*cot(d*x+ c)^2/d+4*a^3*(A-I*B)*ln(sin(d*x+c))/d-1/4*a*A*cot(d*x+c)^4*(a+I*a*tan(d*x+ c))^2/d-1/6*(3*I*A+2*B)*cot(d*x+c)^3*(a^3+I*a^3*tan(d*x+c))/d
Time = 1.45 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.71 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {i a^3 \left (-\left ((3 A-4 i B) (i+\cot (c+d x))^3\right )+3 i A \cot (c+d x) (i+\cot (c+d x))^3-6 i (A-i B) \left (6 i \cot (c+d x)+\cot ^2(c+d x)+8 \log (\tan (c+d x))-8 \log (i+\tan (c+d x))\right )\right )}{12 d} \]
((I/12)*a^3*(-((3*A - (4*I)*B)*(I + Cot[c + d*x])^3) + (3*I)*A*Cot[c + d*x ]*(I + Cot[c + d*x])^3 - (6*I)*(A - I*B)*((6*I)*Cot[c + d*x] + Cot[c + d*x ]^2 + 8*Log[Tan[c + d*x]] - 8*Log[I + Tan[c + d*x]])))/d
Time = 1.09 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.10, number of steps used = 17, number of rules used = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 4076, 27, 3042, 4076, 25, 3042, 4074, 27, 3042, 4012, 25, 3042, 4014, 3042, 25, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+i a \tan (c+d x))^3 (A+B \tan (c+d x))}{\tan (c+d x)^5}dx\) |
\(\Big \downarrow \) 4076 |
\(\displaystyle \frac {1}{4} \int 2 \cot ^4(c+d x) (i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \int \cot ^4(c+d x) (i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \int \frac {(i \tan (c+d x) a+a)^2 (a (3 i A+2 B)-a (A-2 i B) \tan (c+d x))}{\tan (c+d x)^4}dx-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4076 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \int -\cot ^3(c+d x) (i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{3} \int \cot ^3(c+d x) (i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{3} \int \frac {(i \tan (c+d x) a+a) \left ((15 A-14 i B) a^2+(9 i A+10 B) \tan (c+d x) a^2\right )}{\tan (c+d x)^3}dx-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4074 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-\int 24 \cot ^2(c+d x) \left (a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)\right )dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \int \cot ^2(c+d x) \left (a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)\right )dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \int \frac {a^3 (i A+B)-a^3 (A-i B) \tan (c+d x)}{\tan (c+d x)^2}dx\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4012 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (\int -\cot (c+d x) \left ((A-i B) a^3+(i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\int \cot (c+d x) \left ((A-i B) a^3+(i A+B) \tan (c+d x) a^3\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\int \frac {(A-i B) a^3+(i A+B) \tan (c+d x) a^3}{\tan (c+d x)}dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 4014 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-a^3 (A-i B) \int \cot (c+d x)dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-a^3 (A-i B) \int -\tan \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (a^3 (A-i B) \int \tan \left (\frac {1}{2} (2 c+\pi )+d x\right )dx-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{3} \left (\frac {a^3 (15 A-14 i B) \cot ^2(c+d x)}{2 d}-24 \left (-\frac {a^3 (B+i A) \cot (c+d x)}{d}-\frac {a^3 (A-i B) \log (-\sin (c+d x))}{d}-\left (a^3 x (B+i A)\right )\right )\right )-\frac {(2 B+3 i A) \cot ^3(c+d x) \left (a^3+i a^3 \tan (c+d x)\right )}{3 d}\right )-\frac {a A \cot ^4(c+d x) (a+i a \tan (c+d x))^2}{4 d}\) |
-1/4*(a*A*Cot[c + d*x]^4*(a + I*a*Tan[c + d*x])^2)/d + (((a^3*(15*A - (14* I)*B)*Cot[c + d*x]^2)/(2*d) - 24*(-(a^3*(I*A + B)*x) - (a^3*(I*A + B)*Cot[ c + d*x])/d - (a^3*(A - I*B)*Log[-Sin[c + d*x]])/d))/3 - (((3*I)*A + 2*B)* Cot[c + d*x]^3*(a^3 + I*a^3*Tan[c + d*x]))/(3*d))/2
3.1.24.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/ (f*(m + 1)*(a^2 + b^2))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x] )^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a , b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1 ]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[(a*c + b*d)*(x/(a^2 + b^2)), x] + Simp[(b*c - a *d)/(a^2 + b^2) Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && N eQ[a*c + b*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b *c - a*d)*(A*b - a*B)*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 + b^2 ))), x] + Simp[1/(a^2 + b^2) Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[a*A*c + b*B*c + A*b*d - a*B*d - (A*b*c - a*B*c - a*A*d - b*B*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && LtQ[m , -1] && NeQ[a^2 + b^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-a^2)*(B*c - A*d)*(a + b*Tan[e + f*x])^(m - 1)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(b*c + a*d)*(n + 1))), x] - Simp[a/(d*(b*c + a*d)*(n + 1)) Int[ (a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^(n + 1)*Simp[A*b*d*(m - n - 2) - B*(b*c*(m - 1) + a*d*(n + 1)) + (a*A*d*(m + n) - B*(a*c*(m - 1) + b *d*(n + 1)))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && GtQ[m, 1] && LtQ[n, -1]
Time = 0.24 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.69
method | result | size |
parallelrisch | \(\frac {4 a^{3} \left (\left (-\frac {A}{2}+\frac {i B}{2}\right ) \ln \left (\sec ^{2}\left (d x +c \right )\right )+\left (-i B +A \right ) \ln \left (\tan \left (d x +c \right )\right )-\frac {A \left (\cot ^{4}\left (d x +c \right )\right )}{16}+\left (\cot ^{3}\left (d x +c \right )\right ) \left (-\frac {i A}{4}-\frac {B}{12}\right )+\left (\cot ^{2}\left (d x +c \right )\right ) \left (-\frac {3 i B}{8}+\frac {A}{2}\right )+\cot \left (d x +c \right ) \left (i A +B \right )+\left (i A +B \right ) x d \right )}{d}\) | \(109\) |
derivativedivides | \(\frac {a^{3} \left (-i A \left (\cot ^{3}\left (d x +c \right )\right )-\frac {A \left (\cot ^{4}\left (d x +c \right )\right )}{4}-\frac {3 i B \left (\cot ^{2}\left (d x +c \right )\right )}{2}-\frac {B \left (\cot ^{3}\left (d x +c \right )\right )}{3}+4 i A \cot \left (d x +c \right )+2 A \left (\cot ^{2}\left (d x +c \right )\right )+4 \cot \left (d x +c \right ) B +\frac {\left (4 i B -4 A \right ) \ln \left (\cot ^{2}\left (d x +c \right )+1\right )}{2}+\left (-4 i A -4 B \right ) \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) | \(128\) |
default | \(\frac {a^{3} \left (-i A \left (\cot ^{3}\left (d x +c \right )\right )-\frac {A \left (\cot ^{4}\left (d x +c \right )\right )}{4}-\frac {3 i B \left (\cot ^{2}\left (d x +c \right )\right )}{2}-\frac {B \left (\cot ^{3}\left (d x +c \right )\right )}{3}+4 i A \cot \left (d x +c \right )+2 A \left (\cot ^{2}\left (d x +c \right )\right )+4 \cot \left (d x +c \right ) B +\frac {\left (4 i B -4 A \right ) \ln \left (\cot ^{2}\left (d x +c \right )+1\right )}{2}+\left (-4 i A -4 B \right ) \left (\frac {\pi }{2}-\operatorname {arccot}\left (\cot \left (d x +c \right )\right )\right )\right )}{d}\) | \(128\) |
risch | \(-\frac {8 a^{3} B c}{d}-\frac {8 i a^{3} A c}{d}+\frac {2 i a^{3} \left (36 i A \,{\mathrm e}^{6 i \left (d x +c \right )}+24 B \,{\mathrm e}^{6 i \left (d x +c \right )}-69 i A \,{\mathrm e}^{4 i \left (d x +c \right )}-57 B \,{\mathrm e}^{4 i \left (d x +c \right )}+54 i A \,{\mathrm e}^{2 i \left (d x +c \right )}+46 B \,{\mathrm e}^{2 i \left (d x +c \right )}-15 i A -13 B \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}-\frac {4 i a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) B}{d}+\frac {4 A \,a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(171\) |
norman | \(\frac {\left (4 i A \,a^{3}+4 B \,a^{3}\right ) x \left (\tan ^{4}\left (d x +c \right )\right )-\frac {A \,a^{3}}{4 d}+\frac {\left (-3 i B \,a^{3}+4 A \,a^{3}\right ) \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {\left (3 i A \,a^{3}+B \,a^{3}\right ) \tan \left (d x +c \right )}{3 d}+\frac {4 \left (i A \,a^{3}+B \,a^{3}\right ) \left (\tan ^{3}\left (d x +c \right )\right )}{d}}{\tan \left (d x +c \right )^{4}}+\frac {4 \left (-i B \,a^{3}+A \,a^{3}\right ) \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {2 \left (-i B \,a^{3}+A \,a^{3}\right ) \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}\) | \(176\) |
4*a^3*((-1/2*A+1/2*I*B)*ln(sec(d*x+c)^2)+(A-I*B)*ln(tan(d*x+c))-1/16*A*cot (d*x+c)^4+cot(d*x+c)^3*(-1/4*I*A-1/12*B)+cot(d*x+c)^2*(-3/8*I*B+1/2*A)+cot (d*x+c)*(I*A+B)+(I*A+B)*x*d)/d
Time = 0.27 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.45 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {2 \, {\left (12 \, {\left (3 \, A - 2 i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 3 \, {\left (23 \, A - 19 i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (27 \, A - 23 i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - {\left (15 \, A - 13 i \, B\right )} a^{3} - 6 \, {\left ({\left (A - i \, B\right )} a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, {\left (A - i \, B\right )} a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, {\left (A - i \, B\right )} a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (A - i \, B\right )} a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{3 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \]
-2/3*(12*(3*A - 2*I*B)*a^3*e^(6*I*d*x + 6*I*c) - 3*(23*A - 19*I*B)*a^3*e^( 4*I*d*x + 4*I*c) + 2*(27*A - 23*I*B)*a^3*e^(2*I*d*x + 2*I*c) - (15*A - 13* I*B)*a^3 - 6*((A - I*B)*a^3*e^(8*I*d*x + 8*I*c) - 4*(A - I*B)*a^3*e^(6*I*d *x + 6*I*c) + 6*(A - I*B)*a^3*e^(4*I*d*x + 4*I*c) - 4*(A - I*B)*a^3*e^(2*I *d*x + 2*I*c) + (A - I*B)*a^3)*log(e^(2*I*d*x + 2*I*c) - 1))/(d*e^(8*I*d*x + 8*I*c) - 4*d*e^(6*I*d*x + 6*I*c) + 6*d*e^(4*I*d*x + 4*I*c) - 4*d*e^(2*I *d*x + 2*I*c) + d)
Time = 1.19 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.50 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {4 a^{3} \left (A - i B\right ) \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {30 A a^{3} - 26 i B a^{3} + \left (- 108 A a^{3} e^{2 i c} + 92 i B a^{3} e^{2 i c}\right ) e^{2 i d x} + \left (138 A a^{3} e^{4 i c} - 114 i B a^{3} e^{4 i c}\right ) e^{4 i d x} + \left (- 72 A a^{3} e^{6 i c} + 48 i B a^{3} e^{6 i c}\right ) e^{6 i d x}}{3 d e^{8 i c} e^{8 i d x} - 12 d e^{6 i c} e^{6 i d x} + 18 d e^{4 i c} e^{4 i d x} - 12 d e^{2 i c} e^{2 i d x} + 3 d} \]
4*a**3*(A - I*B)*log(exp(2*I*d*x) - exp(-2*I*c))/d + (30*A*a**3 - 26*I*B*a **3 + (-108*A*a**3*exp(2*I*c) + 92*I*B*a**3*exp(2*I*c))*exp(2*I*d*x) + (13 8*A*a**3*exp(4*I*c) - 114*I*B*a**3*exp(4*I*c))*exp(4*I*d*x) + (-72*A*a**3* exp(6*I*c) + 48*I*B*a**3*exp(6*I*c))*exp(6*I*d*x))/(3*d*exp(8*I*c)*exp(8*I *d*x) - 12*d*exp(6*I*c)*exp(6*I*d*x) + 18*d*exp(4*I*c)*exp(4*I*d*x) - 12*d *exp(2*I*c)*exp(2*I*d*x) + 3*d)
Time = 0.30 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {48 \, {\left (d x + c\right )} {\left (-i \, A - B\right )} a^{3} + 24 \, {\left (A - i \, B\right )} a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 48 \, {\left (A - i \, B\right )} a^{3} \log \left (\tan \left (d x + c\right )\right ) - \frac {48 \, {\left (i \, A + B\right )} a^{3} \tan \left (d x + c\right )^{3} + 6 \, {\left (4 \, A - 3 i \, B\right )} a^{3} \tan \left (d x + c\right )^{2} + 4 \, {\left (-3 i \, A - B\right )} a^{3} \tan \left (d x + c\right ) - 3 \, A a^{3}}{\tan \left (d x + c\right )^{4}}}{12 \, d} \]
-1/12*(48*(d*x + c)*(-I*A - B)*a^3 + 24*(A - I*B)*a^3*log(tan(d*x + c)^2 + 1) - 48*(A - I*B)*a^3*log(tan(d*x + c)) - (48*(I*A + B)*a^3*tan(d*x + c)^ 3 + 6*(4*A - 3*I*B)*a^3*tan(d*x + c)^2 + 4*(-3*I*A - B)*a^3*tan(d*x + c) - 3*A*a^3)/tan(d*x + c)^4)/d
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 322 vs. \(2 (137) = 274\).
Time = 0.83 (sec) , antiderivative size = 322, normalized size of antiderivative = 2.05 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=-\frac {3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 24 i \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 8 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 108 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 72 i \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 456 i \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 408 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1536 \, {\left (A a^{3} - i \, B a^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) - 768 \, {\left (A a^{3} - i \, B a^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + \frac {1600 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1600 i \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 456 i \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 408 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 108 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 72 i \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 i \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 8 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \]
-1/192*(3*A*a^3*tan(1/2*d*x + 1/2*c)^4 - 24*I*A*a^3*tan(1/2*d*x + 1/2*c)^3 - 8*B*a^3*tan(1/2*d*x + 1/2*c)^3 - 108*A*a^3*tan(1/2*d*x + 1/2*c)^2 + 72* I*B*a^3*tan(1/2*d*x + 1/2*c)^2 + 456*I*A*a^3*tan(1/2*d*x + 1/2*c) + 408*B* a^3*tan(1/2*d*x + 1/2*c) + 1536*(A*a^3 - I*B*a^3)*log(tan(1/2*d*x + 1/2*c) + I) - 768*(A*a^3 - I*B*a^3)*log(tan(1/2*d*x + 1/2*c)) + (1600*A*a^3*tan( 1/2*d*x + 1/2*c)^4 - 1600*I*B*a^3*tan(1/2*d*x + 1/2*c)^4 - 456*I*A*a^3*tan (1/2*d*x + 1/2*c)^3 - 408*B*a^3*tan(1/2*d*x + 1/2*c)^3 - 108*A*a^3*tan(1/2 *d*x + 1/2*c)^2 + 72*I*B*a^3*tan(1/2*d*x + 1/2*c)^2 + 24*I*A*a^3*tan(1/2*d *x + 1/2*c) + 8*B*a^3*tan(1/2*d*x + 1/2*c) + 3*A*a^3)/tan(1/2*d*x + 1/2*c) ^4)/d
Time = 7.97 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.73 \[ \int \cot ^5(c+d x) (a+i a \tan (c+d x))^3 (A+B \tan (c+d x)) \, dx=\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (2\,A\,a^3-\frac {B\,a^3\,3{}\mathrm {i}}{2}\right )+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (4\,B\,a^3+A\,a^3\,4{}\mathrm {i}\right )-\frac {A\,a^3}{4}-\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {B\,a^3}{3}+A\,a^3\,1{}\mathrm {i}\right )}{d\,{\mathrm {tan}\left (c+d\,x\right )}^4}+\frac {8\,a^3\,\mathrm {atan}\left (2\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B+A\,1{}\mathrm {i}\right )}{d} \]